package com.android.kotlin

import android.app.Application
import com.android.kotlin.util.Preference
import com.kingja.loadsir.core.LoadSir
import zqx.rj.com.mvvm.common.callback.*

/**
 * @Description:
 * @Author: xuwenlong
 * @Email: xuwenlong @ebrun.com
 * @Version:
 * @Create: 2019/2/26 0026
 * @Modify:
 */

class MyApplication :Application(){


    override fun onCreate() {
        super.onCreate()
        // 初始化 SharedPreference
        configLoadSir()
        Preference.setContext(applicationContext)
        Common.init(this);
    }


    private fun configLoadSir() {
        LoadSir.beginBuilder()
            .addCallback(ErrorCallback())
            .addCallback(LoadingCallback())
            .addCallback(EmptyCallback())
            .commit()
    }

}